package com.hospes.rmes.core;

public class ImageDescriptor {

	public final static int IMAGE_SIZE_EXTRA_SMALL = 0;
	public final static int IMAGE_SIZE_SMALL = 1;
	public final static int IMAGE_SIZE_MEDIUM = 2;
	public final static int IMAGE_SIZE_LARGE = 3;

	public ImageDescriptor(String imageIdentity, String imageUrl) {
		imageId = imageIdentity;
		//size = imageSize;
		this.imageUrl = imageUrl;
	}

	public String imageId;
	public String imageUrl;
	// public int size;

	@Override
	public String toString() {
		return String.format(imageId);
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((imageId == null) ? 0 : imageId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ImageDescriptor other = (ImageDescriptor) obj;
		if (imageId == null) {
			if (other.imageId != null)
				return false;
		} else if (!imageId.equals(other.imageId))
			return false;
		if (!imageUrl.equals(other.imageUrl))
			return false;
		return true;
	}

}
